package book;

public class BookList {
    public Book[] books = new Book[10];
    int num;

    public BookList() {
        this.books[0] = new Book("三国演义","罗贯中",10,"小说");
        this.books[1] = new Book("西游记","吴承恩",23,"小说");;
        this.books[2] = new Book("红楼梦","曹雪芹",8,"小说");;
        this.num = 3;
    }

    public Book getBooks(int dd) {
        return books[dd]; //传过去的是Booklist中的一个Book类
    }

    public void setBooks(int dd , Book book) {
        this.books[dd] = book;
    }

        public int getNum() {
            return num;
        }

    public void setNum(int num) {
        this.num = num;
    }
}
